package router.message;

public class StringMessage extends Message {
	private static final long serialVersionUID = 5985150934874350321L;
	private final String str;

	public StringMessage(MessageID dest, String str) {
		super(dest);
		this.str = str;
	}

	public StringMessage(int deviceID, int compID, String str) {
		this(new MessageID(deviceID, compID), str);
	}

	public StringMessage(int fullID, String str) {
		this(new MessageID(fullID), str);
	}

	@Override
	public Message clone() throws CloneNotSupportedException {
		return new StringMessage(dest, str);
	}

	@Override
	public String toString() {
		return "StringMessage [" + str + "]";
	}

	public String getStr() {
		return str;
	}
	
}
